<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/3/21
  Time: 15:02
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page isELIgnored="false"%>
<%--  BootStrap--%>
<link href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<html>
<head>
    <script src="${pageContext.request.contextPath}/js/jquery-3.6.0.js" charset="UTF-8"></script>
    <script charset="UTF-8">
        function a5() {
            $.post({
                url:"${pageContext.request.contextPath}/a5",
                data:{"name":$("#bkname1").val()},
                success:function (data) {

                    $("#addreturn").css("color","red");
                    $("#addreturn").html(data);
                }
            })
        }

    </script>
    <title>增加订单</title>
</head>
<body style="background-color:#e7e7e7 ">
<div class="container" style="background-color: #e7e7e7">
    <div class="row clearfix">
        <div class="col-md-12 column">
            <div class="page-header">
                <h1>
                    <small>新增退货信息</small>
                </h1>
            </div>
        </div>
        <div>
            <form action="${pageContext.request.contextPath}/return/addreturn" method="post">
<%--                <div class="form-group" style="display:none;">--%>
<%--                    <label for="bkname" >商品编号</label>--%>
<%--                    <input type="text" name="id" class="form-control" id="bkname" required>--%>
<%--                </div>--%>

<%--                <div class="form-group">--%>
<%--                    <label for="bkname1">商品名称</label>--%>
<%--                    <input type="text" name="name" class="form-control" id="bkname1" required>--%>
<%--                </div>--%>
                <div class="form-group">
                    <label for="bkname1">商品名称</label>
                    <select  name="name" id="bkname1" onblur="a5()">
                        <c:forEach var="sale" items="${saleproductname}">
                            <option value="${sale.name}">${sale.name}

                            </option>
                        </c:forEach>
                    </select>
                </div>
<%--                <div class="form-group" style="display: none">--%>
<%--                    <label for="bkname2">价格</label>--%>
<%--                    <input type="text" name="price" class="form-control" id="bkname2" required>--%>
<%--                </div>--%>
                <div class="form-group">
                    
                    <label for="bkname3">商品数量</label>
                    <span id="addreturn"></span>
                     <c:if test="${sessionScope.adderror!=null}">
                         ${sessionScope.adderror}
                     </c:if>
                    <input type="text" name="number" class="form-control" id="bkname3" required>
                </div>
                <div class="form-group">
                    <label for="bkname9">原因</label>
                    <input type="text" name="reason" class="form-control" id="bkname9" required>
                </div>
<%--                <div class="form-group" >--%>
<%--                    <label for="bkname4">供货商</label>--%>
<%--                    <input type="text" name="sume" class="form-control" id="bkname4" required>--%>
<%--                </div>--%>
                <div class="form-group">
                    <label for="bkname8">日期</label>
                    <input type="text" name="date" class="form-control"  id="bkname8" required>
                </div>
                <div class="form-group" style="display: none">
                    <label for="bkname6">顾客联系电话</label>
                    <input type="text" name="cphone" class="form-control"  value="123456" id="bkname6" required>
                </div>
                <div class="form-group">
                    <label for="bkname7">备注</label>
                    <input type="text" name="detail" class="form-control" id="bkname7" required>
                </div>
                <div class="form-group">
                    <input type="submit" class="form-control" value="添加">
                </div>
            </form>
        </div>
    </div>
</div>
</body>
</html>
